﻿@model JinianNet.JNCms.Models.Links
<!DOCTYPE html>
<html>
<head>
    <title>@Model.Title - @JinianNet.JNCms.Config.Site.Name</title>
    @JinianNet.Web.ResourceManager.Script.Render("Manage/Base")
    @JinianNet.Web.ResourceManager.Style.Render("Manage/Base")
</head>
<body>
    @using (Html.BeginForm())
    { 
        <table width="95%" align="center" border="0" cellspacing="0" cellpadding="0" class="biggrid">
            <tr>
                <th colspan="2" align="left">&nbsp;</th>
            </tr>
            <tr>
                <td align="center" width="150" class="tm">分　　类</td>
                <td>@Html.DropDownList("ClassID")</td>
            </tr>
            <tr>
                <td align="center" width="150" class="tm">标　　题</td>
                <td><input class="input" type="text" id="Title" name="Title" value="@Model.Title" maxlength="100" /><span>*</span></td>
            </tr>
            <tr>
                <td align="center" width="150" class="tm">链接地址</td>
                <td><input class="input" type="text" id="Url" name="Url" value="@Model.Url" maxlength="100" /><span>*</span> 必须带http:// </td>
            </tr>
            <tr>
                <td align="center" width="150" class="tm">图像链接</td>
                <td>
                     @if (Model.HasLogo)
                    {
                        <input type="radio" onclick="ShowLogoRow()" checked="checked" name="HasLogo" id="cbxYes" value="True" /><label for="cbxYes">是</label> <input type="radio" name="HasLogo" id="cbxNo" value="False" onclick="HideLogoRow()" /><label for="cbxNo">否</label>
                    }
                    else
                    {
                        <input type="radio" onclick="ShowLogoRow()" name="HasLogo" id="cbxYes" value="True" /><label for="cbxYes">是</label> <input type="radio" name="HasLogo" checked="checked" id="cbxNo" value="False" onclick="HideLogoRow()" /><label for="cbxNo">否</label>
                    }
                </td>
            </tr>
            <tr id="trLogo">
                <td align="center" width="150" class="tm">LOGO</td>
                <td><input class="input" type="text" id="Src" name="Src" value="@Model.Src" maxlength="100" /><span>*</span></td>
            </tr>
            <tr>
                <td align="center" width="150" class="tm">排序指数</td>
                <td><input class="input" type="text" id="Rank" name="Rank" value="@Model.Rank" maxlength="4" /><span>*</span> 数字越大，排序越前</td>
            </tr>
            <tr>
                <td align="center" width="150" class="tm">创建时间</td>
                <td>@Model.CreateTime</td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <input type="submit" value="保存操作" />
                    <input type="button" value="返回上页" onclick="history.back()" /></td>
            </tr>
        </table>
        <input type="hidden" id="CreateTime" name="CreateTime" value="@Model.CreateTime" />
        <input type="hidden" id="ID" name="ID" value="@Model.ID" />
        
        <script type="text/javascript">
            function ShowLogoRow(){
                $("#trLogo").show();
            }
            function HideLogoRow(){
                $("#trLogo").hide();
            }
            (function(){
                if(document.getElementById("cbxYes").checked){
                    ShowLogoRow();
                }else{
                    HideLogoRow();
                }
            })()
        </script>
    }
</body>
</html>